<template>
  <div class="regular"></div>
</template>

<script>
export default {
  name: "regular",
  data() {
    return {
      str: "aaabbbcccc"
    };
  },
  mounted() {
    let re = new RegExp("a{1,2}?b{3,}?c{4}");
    console.log(re.test(this.str));
    console.log(this.str.replace(/a{1,2}?b{3,}?c{4}/g, ""));
    var regex = /a{1,2}?b{3,}?c{4}/g;
    var string = "aaabbbcccc";
    console.log(string.match(regex));
  },
  methods: {}
};
</script>

<style lang="less" scoped>
</style>
